		$('#headbox').load('php/header.php');
		$('#footbox').load('php/footer.php');
		/*****标签页面切换******/
		$('#sect>header>h3').click(function(){
			$(this).addClass('head').siblings().removeClass('head');
			hide($('#sect>header>h3'),$('#sect div[id^="sect_"]'));
			var divs=$('#sect div[id^="sect_"]');
			for(var i=0;i<divs.length;i++){
				divs[i].style.display="none";
			}
			var i=$(this).attr('i');
			divs[i].style.display="block";
		});
		$('.news>div>h3').click(function(){
			$(this).addClass('head').siblings().removeClass('head');
			var divs=$('.news [id^="news_"]');
			for(var i=0;i<divs.length;i++){
				divs[i].style.display="none";
			}
			var i=$(this).attr('i');
			divs[i].style.display="block";
		});
		$('.ranking>div>.rt>p').click(function(){
			$(this).addClass('paihang').siblings().removeClass('paihang');
			var divs=$('.ranking [id^="ranking_"]');
			for(var i=0;i<divs.length;i++){
				divs[i].style.display="none";
			}
			var i=$(this).attr('i');
			divs[i].style.display="block";
		});
		/****超链接禁用******/
		$(function(){
			$('.sum').each(function(){
				var n=$(this).html().slice(0,-1);
				var a1=$(this).parent().parent().parent().parent().children('a');
				var a2=$(this).parent().parent().siblings('ul').children().children('a');
				if(n>=0&&n<=100){
					$(this).prev().css('width',n*2+"px");
				}
				if(n>=100){
					a1.removeAttr('href');
				}
				if(n>=100&&a2.html()=="立即投资"){
					a2.removeAttr('href');
				}
			});
		});
		/*******合作伙伴图片滚动**********/
		$(function(){
			var ul=document.getElementById('scroll');
			ul.innerHTML=ul.innerHTML+ul.innerHTML;
			var lis=document.querySelectorAll('#scroll>li');
			var limargin=parseInt(getComputedStyle(lis[0]).marginLeft)*2;
			ul.style.width=lis.length*(lis[0].offsetWidth+limargin)+'px';
			console.log(ul.offsetLeft,ul.offsetWidth);
			function move(){
				if(ul.offsetLeft<-(ul.offsetWidth/2)){
					ul.style.left='0';
				}
				ul.style.left=ul.offsetLeft-2+'px';
			}
			var t=setInterval(move,20);
			$('#carousel>div').hover(
				function(){
					clearInterval(t);
				},
				function(){
					t=setInterval(move,20);
				}
			);
		});
		/*********图片轮播**********/
		$(document).ready(function() { 
			var length, 
			currentIndex = 0, 
			interval, 
			hasStarted = false, //是否已经开始轮播 
			t = 3000; //轮播时间间隔 
			length = $('.slider-panel').length; 
			//将除了第一张图片隐藏 
			$('.slider-panel:not(:first)').hide(); 
			//将第一个slider-item设为激活状态 
			$('.slider-item:first').addClass('slider-item-selected'); 
			//隐藏向前、向后翻按钮 
			$('.slider-page').hide(); 
			//鼠标上悬时显示向前、向后翻按钮,停止滑动，鼠标离开时隐藏向前、向后翻按钮，开始滑动 
			$('.slider-panel, .slider-prev, .slider-next').hover(
				function() { 
					stop(); 
					$('.slider-page').show(); 
				},
				function() { 
					$('.slider-page').hide(); 
					start(); 
				}
			); 
			$('.slider-item').hover(
				function() { 
					stop(); 
					var preIndex = $(".slider-item").filter(".slider-item-selected").index(); 
					currentIndex = $(this).index(); 
					play(preIndex, currentIndex); 
				},
				function() { 
					start(); 
				}
			); 
			$('.slider-prev').unbind('click'); 
			$('.slider-prev').bind('click', function() { 
				pre(); 
			}); 
			$('.slider-next').unbind('click'); 
			$('.slider-next').bind('click', function() { 
				next(); 
			}); 
			  /* 向前翻页  */
			function pre() { 
				var preIndex = currentIndex; 
				currentIndex = (--currentIndex + length) % length; 
				play(preIndex, currentIndex); 
			} 
			  /* 向后翻页 */
			function next() { 
				var preIndex = currentIndex; 
				currentIndex = ++currentIndex % length; 
				play(preIndex, currentIndex); 
			} 
			  /*** 从preIndex页翻到currentIndex页  * preIndex 整数，翻页的起始页  * currentIndex 整数，翻到的那页   */
			function play(preIndex, currentIndex) { 
				$('.slider-panel').eq(preIndex).fadeOut(500).parent().children().eq(currentIndex).fadeIn(1000); 
				$('.slider-item').removeClass('slider-item-selected'); 
				$('.slider-item').eq(currentIndex).addClass('slider-item-selected'); 
			} 
			  /** 开始轮播  */
			function start() { 
				if(!hasStarted) { 
					hasStarted = true; 
					interval = setInterval(next, t); 
				} 
			} 
			  /** 停止轮播  */
			function stop() { 
				clearInterval(interval); 
				hasStarted = false; 
			} 
				//开始轮播 
				start(); 
		}); 
		//banner 高度变化
		$(function(){
			$('#banner .slider').css({
				'height':$("#banner .slider-panel img").css('height')
			})
		});
